//package com.example.java.kafka.es9client;
//
//import co.elastic.clients.elasticsearch.core.BulkRequest;
//import co.elastic.clients.elasticsearch.core.BulkResponse;
//
//public class BatchDeleteDoc {
//    public static void main(String[] args) {
//        ConnectElasticsearch.connect(client -> {
//            BulkRequest.Builder bulkRequest = new BulkRequest.Builder();
//            bulkRequest.operations(op -> op.delete(d -> d.index("user").id("1001")))
//                    .operations(op -> op.delete(d -> d.index("user").id("1002")))
//                    .operations(op -> op.delete(d -> d.index("user").id("1003")));
//            BulkResponse bulkResponse = client.bulk(bulkRequest.build());
//            System.out.println("took: " + bulkResponse.took());
//            System.out.println("items: " + bulkResponse.items().size());
//        });
//    }
//}